package com.zzyl.redis;

import com.zzyl.serve.util.WechatUtil;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;

@SpringBootTest
public class WechatUtilTest {

    @Resource
    private WechatUtil wechatUtil;

    @Test
    public void testGetOpenid() {
        String openid = wechatUtil.getOpenid("0b3jRB300ERVPU1xma300Uwzkh3jRB3l");
        System.out.println(openid);
    }

    @Test
    public void testGetPhone() {
        String phone = wechatUtil.getPhone("b5200b7cb07dd5d2c69caa116705c012dab03ebe1f54db6e7d4bc75139ef57d8");
        System.out.println(phone);
    }
}
